<!-- A.html -->
<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>A</title>
	</head>

	<body>
		<h1>A 页面</h1>
		<script>
			// 重复写入相同的值无法触发
			// 会受到浏览器隐身模式等的限制
			window.onstorage = function (e) {
				console.log(e.key + ' 键已经从 ' + e.oldValue + ' 改变为 ' + e.newValue + '.');
			};
		</script>
	</body>
</html>
